#include "Stdafx.h"

using namespace Opcode;

inline_ void FindRunningIndex(udword& index, float* array, udword* sorted, int last, float max)
{
	int First = index;
	while (First <= last)
	{
		index = (First + last) >> 1;
		if (max > array[sorted[index]]) First = index + 1;
		else last = index - 1;
	}
}

#define PRUNING_SORTER RadixSort

static PRUNING_SORTER* gCompletePruningSorter = null;
static PRUNING_SORTER* gBipartitePruningSorter0 = null;
static PRUNING_SORTER* gBipartitePruningSorter1 = null;

